import { createStore, combineReducers } from 'redux'
import countReducer from './components/count/redux/reducer'
import listReducer from './components/list/redux/reducer'
// 注意: 创建store对象时,只允许传入一个reducer函数.但是实际开发,一定会因为协作开发的问题创建多个reducer,所以将多个合并成一个.然后传入createStore
const rootReducer = combineReducers({
  xxx: countReducer,
  yyy: listReducer,
})
export default createStore(
  rootReducer,
  window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
)
